import service from '@/utils/request'

// @Tags People
// @Summary 创建答题人员信息
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.People true "创建答题人员信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /people/createPeople [post]
export const createPeople = (data) => {
  return service({
    url: '/people/createPeople',
    method: 'post',
    data
  })
}

// @Tags People
// @Summary 删除答题人员信息
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.People true "删除答题人员信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /people/deletePeople [delete]
export const deletePeople = (data) => {
  return service({
    url: '/people/deletePeople',
    method: 'delete',
    data
  })
}

// @Tags People
// @Summary 批量删除答题人员信息
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除答题人员信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /people/deletePeople [delete]
export const deletePeopleByIds = (data) => {
  return service({
    url: '/people/deletePeopleByIds',
    method: 'delete',
    data
  })
}

// @Tags People
// @Summary 更新答题人员信息
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.People true "更新答题人员信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /people/updatePeople [put]
export const updatePeople = (data) => {
  return service({
    url: '/people/updatePeople',
    method: 'put',
    data
  })
}

// @Tags People
// @Summary 用id查询答题人员信息
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.People true "用id查询答题人员信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /people/findPeople [get]
export const findPeople = (params) => {
  return service({
    url: '/people/findPeople',
    method: 'get',
    params
  })
}

// @Tags People
// @Summary 分页获取答题人员信息列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取答题人员信息列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /people/getPeopleList [get]
export const getPeopleList = (params) => {
  return service({
    url: '/people/getPeopleList',
    method: 'get',
    params
  })
}
